
def client_invoice_filter_queryset(request, queryset):
    query = queryset
    params = request.query_params

    if 'booking' in params:
        query = query.filter(appointment__booking_id=params['booking'])

    if 'client' in params:
        query = query.filter(client=params['client'])

    return query